const jsonwebtoken = require("jsonwebtoken");
const secret = "pengYuYan";
// token
const generate = (value) => {
  return jsonwebtoken.sign(value, secret, { expiresIn: "1d" });
};
const verify = (token) => {
  return jsonwebtoken.verify(token, secret);
};
module.exports = {
  generate,
  verify,
};
